* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.back-button {
    background-color: #8ab0f4;
    color: white;
    margin-left: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border: none;
    border-radius: 3px;

}
textarea {
    resize: none; /* 禁用拉伸 */
}
.back-button:hover {
    background-color: #80a7e4;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.back-button:hover i {
    transform: translateX(-2px);
}

.back-button i {
    transition: transform 0.3s ease;
    color: white;
}
.video-publish-form {
    width: 60%;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.cover-container {
    position: relative;
    width: 300px;
    height: auto;
display: flex;
}
.cover-upload-placeholder {
    border: 2px dashed #ccc;
    border-radius: 5px;
    /* padding: 30px; */
    text-align: center;
    cursor: pointer;
    margin-bottom: 10px;
    width: 148px;
    font-size: 12px;
    height: 124px;
    text-align: center;
    line-height: 124px;
    color: #b19c9c;
}
.cover-container img {
    border: 1px solid #ccc;
}

.cover-container input {
    display: none;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover.tooltiptext {
    visibility: visible;
    opacity: 1;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.form-group select {
    width: 200px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.char-count {
    float: right;
    color: #999;
}

#addTopicButton {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #f9f9f9;
    cursor: pointer;
}

#topicList {
    list-style-type: none;
    padding: 0;
    margin-top: 5px;
}

#topicList li {
    display: inline-block;
    background-color: #f4f4f4;
    padding: 5px 10px;
    border-radius: 3px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.form-group input[type="radio"] {
    margin-right: 5px;
}

.form-actions {
    text-align: center;
}

#cancelButton,
#publishButton {
    padding: 8px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#cancelButton {
    background-color: #f4f4f4;
    color: #333;
}

#publishButton {
    background-color: #8ab0f4;
    color: white;
    margin-left: 20px;
}

#description {
    height: 310px;
    outline: none;
    font-size: 16px;
}

#title {
    height: 52px;
    outline: none;
    font-size: 17px;
}
.cover-container {
    position: relative;
    width: 300px;
    height: 180px; /* 固定容器高度，避免内容切换时布局跳动 */
}

.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.cover-upload-placeholder {
    border: 2px dashed #ccc;
    border-radius: 5px;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 180px; /* 与容器高度一致，垂直居中 */
    color: #b19c9c;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 有视频时隐藏提示框，显示视频预览和删除按钮 */
.has-video .cover-upload-placeholder {
    display: none;
}

.has-video .video-preview {
    display: block;
}

/* 删除按钮样式 */
#deleteButton {
    position: absolute;
    top: -10px;
    left: 297px;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    padding: 0px;
    cursor: pointer;

    width: 28px;
    height: 28px;
    text-align: center;
    display: flex
;
    align-items: center;
    justify-content: center;
}
.cover-container-outer{
    display: flex
;
    position: relative;
}
.has-video #deleteButton {
    display: block;
}